const initialState = {
  channels: [],
  list: [],
  count: 0,
  page: 1,
  pageSize: 10,
};

const article = (state = initialState, action) => {
  switch (action.type) {
    case 'article/getChannels':
      return {
        ...state,
        channels: action.payload,
      };
    case 'article/getArticles':
      return {
        ...state,
        ...action.payload,
      };
    default:
      return state;
  }
};

export { article };
